package cn.dakaqi.services.user;

import cn.dakaqi.entities.user.User;
import cn.dakaqi.entities.user.UserOpenId;
import cn.dakaqi.entities.user.Volunteer;
import cn.dakaqi.utils.exception.ServiceRuntimeException;
import cn.dakaqi.vo.response.UserVolunteer;

import java.util.List;

/**
 * @author chunyang on 2016/4/7.
 */
@SuppressWarnings("unused")
public interface UserService {
    User findOne(Long userId) throws ServiceRuntimeException;

    List<User> getAllUser() throws ServiceRuntimeException;

    User findByMobile(String mobile) throws ServiceRuntimeException;

    User findByEmail(String email) throws ServiceRuntimeException;

    User findByMobileOrEmail(String mobile,String email);

    User login(String mobile, String password) throws ServiceRuntimeException;

    User login(String mobile, String password, String area, double lng, double lat) throws ServiceRuntimeException;

    void saveThirdPartyUser(User user, Volunteer volunteer) throws ServiceRuntimeException;

    void saveUser(User user) throws ServiceRuntimeException;

    void bundMobile(String json) throws ServiceRuntimeException;

    void saveUser(String json, String client) throws ServiceRuntimeException;

    User saveSimpleUser(User user) throws ServiceRuntimeException;

    UserVolunteer saveUser(User user, String verififerCode) throws ServiceRuntimeException;

    User saveUserOnly(User user, String code) throws ServiceRuntimeException;

    void updatePassd(String param) throws ServiceRuntimeException;

    void updatePsswd(Long id, String oldPasswd, String newPasswd) throws ServiceRuntimeException;

    void updateUser(String json) throws ServiceRuntimeException;

    void updateUser(User user) throws ServiceRuntimeException;

    void deleteUser(Long id) throws ServiceRuntimeException;

    void lockUser(Long id, int lockedStatus) throws ServiceRuntimeException;

    void setNewPasswd(String mobile, String passwod) throws ServiceRuntimeException;

    void setNewPasswd(String param) throws ServiceRuntimeException;

    String sendVerifierCode(String mobile) throws ServiceRuntimeException;

    void updateMobile(String param) throws ServiceRuntimeException;

    void updateMobile(String oldMobile, String newMobile) throws ServiceRuntimeException;

    void updateMobile(String oldMobile, String newMobile, String code) throws ServiceRuntimeException;

    void updateMobile(String oldMobile, String password, String newMobile, String code) throws ServiceRuntimeException;

    void regUser(Volunteer volunteer, String groupCode) throws ServiceRuntimeException;

    User tencent(String param, String client) throws ServiceRuntimeException;

    User sina(String param, String client) throws ServiceRuntimeException;

    User wechat(String param, String client) throws ServiceRuntimeException;

    User signIn(String param, String client) throws ServiceRuntimeException;

    UserOpenId save(UserOpenId userOpenId) throws ServiceRuntimeException;

    UserOpenId findOpenId(String memberCode, int type, String client) throws ServiceRuntimeException;


}